require './../../../../libs/styles/list.sass'
require './../../../../libs/styles/messagePush.sass'

module.exports = angular.module 'messagePush.view', [
  require('dialogService').name
]
.controller 'MessagePushViewCtrl', ($log, $rootScope, $scope, $location,$state, $stateParams)->
  $log.log "messagePush view controller init"
  messagePushService   = $scope.messagePushService

  _config = ->
    $scope.oldMessage =
      createTime:1473928200000
      operatorName: "孙  艳"
      operatorUid:"24697981114515647"
      readCount:40
      totalCount:60
  _load = ->
    $log.log $stateParams
    messagePushService.get {"id": $stateParams.messagePushId}, (message)->
      $scope.message = message
    $scope.message = $scope.oldMessage
  _config()
  _load()
  $scope.cancel = -> $state.go 'index.messagePush.list'
